<?php 
$I = new AcceptanceTester($scenario);
$I->wantTo('Add new parcel for waiting. Delete it.');

//сreat parcels
$I->amOnPage('/');
TestCommon::login($I);

$I->amOnPage('parcels/awaiting');
$I->see('Ожидаемые посылки');
$I->amOnPage('parcels/awaiting/add-form');
$I->seeResponseCodeIs('200');
$csrf = $I->grabValueFrom('//*[@name="csrf"]');
$I->submitForm('#formAwaitingParcel', array(
	'shop'		=> 'Ashford', 
	'shop_id' 	=> '1095',
	'warehouse'	=> '1', 
	'quantity' 	=> '1',
	'invoice' 	=> '',
	'csrf'		=> $csrf, 
	'saveMain' 	=> '1'));
$I->seeResponseCodeIs('200');

//delete parcels
$I->submitForm('#formAwaitingParcel', array(
	'invoice'	=> '', 
	'csrf' 		=> $csrf,
	'remove'	=> '1',));
$I->seeResponseCodeIs('200');
